#ifndef IDENTITYVIEW_H
#define IDENTITYVIEW_H

#include "viewobject.h"
#include "paramobject.h"
#include <QLabel>
#include <QMovie>
#include <qdom.h>
#include "huaqimovie.h"


typedef struct TrainViewParam
{
    QString m_resNormalPath;
    QString m_resNormalPosPath;

    TrainViewParam()
    {
        m_resNormalPath = "";
    }
}TrainViewParam;

class TrainView : public ViewObject
{
    Q_OBJECT
public:
    static int m_id;
    Q_INVOKABLE explicit TrainView(QWidget *parent = 0);
    ~TrainView();

    void ShowObject();

    void GetAttribute(std::string&);

    void SetAttribute(std::string);

    void ParseXML(QDomElement*);

    void PacketXML(QDomElement*);

    void ShowUrl();

    void RunItemsChange();

    void FinalShow(QString url);

    QString FindFile(QString prefix, QString name);

public slots:
    void StopGifEnd(int frame);

private:
    TrainViewParam* m_paramIdentity;
    //遮盖用到的
    QString         m_pos_url;
    QLabel*         m_label;
    QMovie*         m_movie;
    HuaqiMovie*     hq_movie;
};

#endif // IDENTITYVIEWOBJECT_H
